#ifndef SCREENRECTITEM_H
#define SCREENRECTITEM_H

#include <QGraphicsRectItem>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QPen>
#include <QCursor>
#include <QPointF>
#include <QGraphicsSceneMouseEvent>

#include "utils.h"

class ScreenRectItem : public QObject, public QGraphicsRectItem
{
    Q_OBJECT

public:
    ScreenRectItem(QGraphicsItem * parent, QGraphicsScene * scene);

protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event);

signals:
    void screenMove(QPointF newPosition);

public slots:
    void screenPanned(QPointF newPosition);

private:
    QPointF lastMousePosition;
};

#endif // SCREENRECTITEM_H
